function OnChange(query) {
    // console.log("query-->",query)
    // 进入onchange事件
    query = query || {};
    field = query.key;
    newVal = query.value;
    oldVal = query.old;
    params = query.params; // 开发者定义数据
   
  
    let setting = Process("yao.form.Setting", "cmdb.process");
    if (setting && setting.code && setting.message) {
      throw new Exception(setting.message, 500);
    }

    let data ; 

    if(field == 'type' && newVal == 'keepalive'){
        // console.log("----------keepalive---------------");
        setting['form']['sections'][0]['columns'].push({
            "name":"VIP",
            "width": 8
         },{
            "name":"优先级",
            "width": 8
         },{
          "name":"KPID",
          "width": 8
       });
    
        Object.assign(setting['fields']['form'], {"VIP": {
            "bind": "vip", 
            "view": {
                "props": {},
                "type": "Text"
            },
            "edit": {
              "type": "Input",
              "props": {}
            }
        }}, {"优先级": {
            "bind": "priority", 
            "view": {
                "props": {},
                "type": "Text"
            },
            "edit": {
              "type": "Input",
              "props": {}
            }
        }}, {"KPID": {
          "bind": "kp_id", 
          "view": {
              "props": {},
              "type": "Text"
          },
          "edit": {
            "type": "Input",
            "props": {}
          }
      }});
       // data = { ...query, vip: "192.168.127.88",priority:1 }; 
        data = { ...query }; 

    }else{
       // console.log("----------normal---------------");
       delete setting['fields']['form'].VIP
       columns = setting['form']['sections'][0]['columns']
       columns = columns.filter(function(obj) {
        return obj.name !== "VIP";
      });
      data = { ...query }
      delete data.vip
      delete data.priority
      delete data.kp_id
    }
   
    return {
      data: data,
      setting: setting,
    };
  }
